package com.zhoug.plugin.android.constgenerator.beans;

public class ConstField {
    private static String defaultFieldName="TYPE";
    private String fieldName=defaultFieldName;
    private String name;
    private int value;

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        if(fieldName!=null && fieldName.trim().length()>0){
            this.fieldName = fieldName;
        }else{
            fieldName= defaultFieldName;
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static void setDefaultFieldName(String defaultFieldName) {
        ConstField.defaultFieldName = defaultFieldName;
    }

    public static String getDefaultFieldName() {
        return defaultFieldName;
    }

    @Override
    public String toString() {
        return "{" +
                "fieldName:'" + fieldName + '\'' +
                ", name:'" + name + '\'' +
                ", value:" + value +
                '}';
    }
}
